/****************************************************************************/    
/* NAME:           Hal_UsartManagement.h                                    */    
/* PURPOSE:        Manage all USART                                         */    
/* CREATED_BY:     Vyx                                                      */    
/* CREATION_DATE:  03/07/2012                                               */ 
/************************************** (C) Copyright 2012 AquaLink *********/ 

#ifndef USART_MANAGEMENT_DEF  
#define USART_MANAGEMENT_DEF    

#include "Hal_GenericConfig.h"
#include "stm32f10x.h"
#include "stm32_config.h"
#include "main.h"

/* to choose the config pin input */  
#ifdef STM32_CONFIG_1 /* STM32_CONFIG_1 */ 

/* Add your USART in this table */  
    #define UART_1  0
#endif /* STM32_CONFIG_1 */

#ifdef STM32_CONFIG_2 /* STM32_CONFIG_2 */

/* Add your USART in this table */  
    #define UART_1  0
#endif /* STM32_CONFIG_2 */
/*______________________________*/

typedef struct
{
  USART_TypeDef *UsartName;
  uint32_t       BaudRate;
  uint8_t        WordLength;
  uint8_t        StopBits;
  uint8_t        Parity;
}Usart_def_t;


/**    
  * @brief  Main function of usart management.  
  *         This function is execute one time at the start.
  * @param  none    
  * @retval None    
  */  
void vTaskCTRL_UsartManagementInit(void);

/**    
  * @brief  To get data from usart
  * @param  none    
  * @retval None    
  */ 
uint8_t USART_Scanf(uint32_t value);

#endif /* USART_MANAGEMENT_DEF */
